function that works only once... - Mailing list pgsql-novice

From Niclas Hedell
Subject function that works only once...
Date
Msg-id p05200f00bb4eddd96115@[192.168.0.37]
Whole thread Raw
Responses Re: function that works only once...
List pgsql-novice
Hi list,

I've a strange problem here that someone might know the answer to. I have a function in plpgsql that works only the first time after creating (installing) the function. After that I get the following error:
Fatal - ERROR:  pg_class_aclcheck: relation 51755 not found

I've tried to find pg_class_aclcheck in pg_class but it's not there. Here is my function:

create or replace function display_attributes(varchar) returns varchar as '
declare
      classNameVar alias for $1;
      query_string text;
      tablename varchar(20);
begin
     query_string := ''create view the_groupview as select * from getattribute('' || quote_literal(classNameVar) || '')'';
   execute query_string;
   select into tablename the_tablename from the_groupview;
drop view the_groupview;
        return tablename;
end;'
language 'plpgsql' with (isstrict);

Thanx in advance! :-)

Cheers,
Nick

pgsql-novice by date:

Previous
From: "David Choo"
Date:
Subject: Unable to start postmaster
Next
From: Andrew Vit
Date:
Subject: Re: designing tables - sidetrack into arrays